SOC estimation of lead–carbon battery based on GA-MIUKF algorithm

The paper proposes a SOC (State of Charge) estimation method for lead–carbon batteries based on the GA-MIUKF algorithm. The GA-MIUKF algorithm combines GA (Genetic Algorithm) for global search and optimization with the MI-UKF (Multi-innovation Unscented Kalman Filter) algorithm for estimating the SOC of lead–carbon batteries. By establishing an equivalent circuit model for the battery, the GA is employed to globally search and optimize the battery model parameters and the noise variance parameters in the MI-UKF algorithm. Comparative analyses with the UKF (Unscented Kalman Filter) algorithms and MI-UKF algorithms reveal that the SOC estimation method based on the GA-MIUKF algorithm yields more accurate results for lead–carbon battery SOC estimation, with an average estimation error of 2.0%. This highlights the efficacy of the proposed approach in enhancing SOC estimation precision.

Introduction: Introduction to the Characteristics of Lead-Carbon Batteries and the Research Background, Significance, Objectives, Main Research Content, and Methodology of Battery State of Charge (SOC) Estimation.Battery modeling: The GNL circuit is chosen as the model for lead-carbon batteries, providing the foundational estimation for subsequent State of Charge assessments.Methodology: Details the GA-MIUKF method for estimating the SOC of lead-carbon batteries.Results and Discussion: Battery subjected to HPPC and simulated UDDS tests, combined with identified parameter results, compared the estimation results of UKF, MIUKF, GA-MIUKF algorithms under UDDS working conditions, and evaluated the accuracy and practicality of the proposed method.Conclusion: Summarizes the main research content and conclusions of the paper.
Through this structure, the paper aims to conduct an in-depth study and analysis of SOC estimation for lead-carbon batteries.It introduces the GA-MIUKF method for estimating the SOC of lead-carbon batteries and aims to provide robust support for research and applications in related fields.

Battery modeling
Lead-carbon batteries are commonly used in energy storage applications, and modeling their performance is a crucial area of research in battery management systems.The circuit equivalent model is one of the most commonly used methods in battery modeling, and the GNL (Gummel-Null Line) equivalent circuit is a specific circuit model employed to describe the behavior and performance of batteries during charge and discharge processes 9,10 .In the equivalent circuit, the charge and discharge processes of the battery can be represented by an RC circuit composed of internal resistance and electrochemical capacitance.During discharge, the electrochemical potential source indicates that the battery's potential decreases as the battery discharges.Conversely, during charging, the electrochemical potential source indicates that the potential of the charging power supply increases as the battery charges.The GNL equivalent circuit model can be utilized to predict the performance of lead-carbon batteries under various operating conditions.Figure 1 below illustrates a second-order GNL model as the equivalent model for lead-carbon batteries.
The following equations are constructed from the second-order GNL model: In this model, U t represents the battery terminal voltage, U oc is the static electromotive force of the battery, I denotes the charging and discharging current of the battery, R 0 signifies the contact resistance and internal ohmic resistance of various processes within the battery cell, R 1 and C 1 represent the internal polarization phenomenon of the battery cell, R 2 and C 2 manifest the internal diffusion phenomenon of the battery, for the equivalent capacitance of the battery, and Rs represents the self-discharge resistance of the battery.The second-order GNL model can intricately simulate the internal chemical reactions and ion migration of the lead-carbon battery.In comparison to traditional circuit equivalent models, it can more accurately predict the battery's performance, thereby enhancing the precision and efficiency of battery management systems.

Methodology Genetic algorithm for model parameters
The Genetic Algorithm is an optimization algorithm based on the principles of natural evolution and genetic mechanisms 11,12 .It simulates processes such as selection, crossover, and mutation that occur in biological evolution.By encoding and evolving candidate solutions, it continuously optimizes and evolves to find the optimal solution or an approximate optimal solution.The advantages of genetic algorithms lie in their ability to handle complex nonlinear problems, possess global optimization capabilities, and are not constrained by conditions or influenced by initial solutions.They can be applied to parameter optimization in the battery parameter identification process, specifically using optimization algorithms to search for the optimal parameter solution, thereby achieving improved parameter estimation, as illustrated in Fig. 2.
1. Encoding the set of system parameters: In the process of battery parameter identification, the model parameters of lead-carbon batteries identified using the forgetting factor least squares method are encoded into binary.These encoded data will be used to assess the accuracy and reliability of battery parameter estimation.

Initializing the population:
Utilizing the data of battery model parameters, a set of initial parameter solutions is generated as the population.Each parameter solution constitutes a vector of battery model parameters, essentially forming chromosomes.
3. Fitness calculation: Each individual's parameter solution is entered into the fitness function to calculate its fitness value, assessing its ability to solve the problem.The fitness function is typically defined by comparing the error between modelpredicted values and actual measured values.
4. Selecting the optimal solution: Through the selection operator, some excellent individuals are chosen from the current population as the parents of the next generation.Here, Q and R are covariance matrices used to describe the characteristics of noise in the system and measurement process.Q represents the covariance of system process noise, while R represents the covariance of measurement noise.The algorithm employs Q = 0.1 and R = 0.001, determined through a parameter tuning process.This process involves conducting sensitivity analysis and using genetic algorithms to optimize parameters to minimize estimation errors.

MI-UKF algorithm
The MI-UKF algorithm is an improved version of the UKF algorithm 13 , utilized for state estimation in systems.
Compared to traditional Extended Kalman Filter (EKF) and UKF algorithms, the MI-UKF algorithm can more accurately estimate the states of nonlinear systems.In the UKF algorithm, a set of Sigma points is chosen to approximate the probability distribution of state variables, facilitating state estimation in nonlinear systems.However, over time, the number of Sigma points increases rapidly, leading to an escalation in the computational complexity of the system.The MI-UKF algorithm addresses this issue by introducing a new information matrix.
During each measurement, the MI-UKF algorithm utilizes this new information matrix to update the Sigma points, reducing their quantity and concurrently enhancing the accuracy of state estimation and computational efficiency 14 .
Steps in the application of the MI-UKF algorithm for estimating the State of Charge (SOC) in lead-carbon batteries: 1. Initialize the mean x 0 of the battery state vector X0 and the state estimation error covariance matrix P0.

Calculating Sigma points at k-1 moments:
Sigma points are calculated using the predicted state vector and covariance matrix to estimate the nonlinear distribution of states.

⌢
x k−1 represents the optimal estimate of the state variables at time k-1, including SOC, Ub, U1, U2; P k−1 is the state covariance matrix at moment k-1;n is the number of dimensions of the state variables;γ is the scaling factor.

Status variable update:
The obtained Sigma points are brought into the nonlinear equation the predicted values of the mean and covariance of the state variables at moment k: where Q k−1 and R k−1 are the process noise covariance and measurement noise covariance of the previous moment, respectively.
The weight coefficient W ι m in Eq: x 0 = E(x 0 ) The Sigma points are transformed using the measurement function to obtain the predicted measurement vector.

Update state:
Utilize the difference between the measured value and the mean of the predicted measurement vector, along with the Kalman gain, to update the state vector and the state covariance matrix.
Kalman filtering gain update: New Interest Sequence: The new interest e k represents the difference between the predicted value and the actual observed value.
State variable estimation update: Covariance estimation update:

GA-MIUKF algorithm
The GA-MIUKF algorithm combines Genetic Algorithm, multi-innovation Unscented Kalman Filter, and system identification techniques to address state estimation problems in systems with nonlinearity and non-Gaussian characteristics.The GA-MIUKF algorithm utilizes Genetic Algorithm for global search and optimization of system parameters, aiming to achieve more accurate system models and state estimation results.Of particular concern is the impact of the initial SOC value and temperature on the GA-MIUKF algorithm.In literature 15 , research suggests that unknown initial SOC may lead to the algorithm requiring more time to converge when estimating the initial state.The filter may need more measurement data to accurately estimate SOC, potentially making the estimation system more susceptible to noise and measurement errors, resulting in inaccurate estimates and system instability.Temperature is a crucial environmental factor, and temperature variations can alter battery model parameters.Parameters such as internal resistance and open-circuit voltage are typically temperature-dependent.If these parameters are unknown in the estimation algorithm, temperature changes may introduce model uncertainty, affecting the performance of the estimation algorithm 16 .The GA-MIUKF algorithm for lead-carbon battery State of Charge estimation comprises the following steps: 1. MI-UKF Algorithm Parameter Initialization:Initialize all parameters of the MI-UKF algorithm.

Setting System Parameters:
Import the lead-carbon battery model parameters identified using the forgetting factor least squares method into the genetic algorithm.These model parameters are designated as the parameters to be optimized by the genetic algorithm.
Build the system parameter matrix:

Global Search and Optimization with Genetic Algorithm:
Employ genetic algorithm for global search and optimization of battery model parameters and noise variance parameters in the MI-UKF algorithm, aiming to enhance estimation accuracy.The genetic algorithm typically involves steps such as initialization, fitness evaluation, selection, crossover, and mutation.
4. Update MI-UKF Algorithm Parameters: Update the state estimator of the MI-UKF with the optimal system parameters and continue the state estimation process.The equation of state and the output equation are given by: ⌢ Obtaining the State of Charge (SOC) for Lead-Carbon Battery: Process the state estimate values to obtain the estimated SOC for the battery.The specific workflow is illustrated in the flowchart shown in Figure 3.

Experiment preparation
The study investigates a single 2 V cell with a capacity of 16.67 Ah.This cell is extracted from the 6-GFM-17 lead-carbon battery.The experimental testing instrument employed was the CT-8002 battery testing system.The lead-carbon batteries were placed inside a constant temperature chamber, and the fixture of the battery testing system was attached to the positive and negative terminals of the lead-carbon battery.The battery testing system was controlled by a computer to conduct charging and discharging tests on the lead-carbon battery.The measurement data and dynamic characteristics of the battery were transmitted to the computer through a data acquisition card.The experimental setup of the lead-carbon battery is depicted in Fig. 4.

HPPC testing
For the identification of model parameters, this study employed HPPC (Hybrid Pulse Power Characterization) testing 17 .The HPPC test is capable of identifying the internal parameters of the battery model, providing reliable Taking into account experimental conditions, equipment availability, and prior experimental experience, HPPC is the most suitable method for our specific research objectives 18 .

Set system parameters
This study utilized a discharge rate of 0.2C for the battery discharge.Choosing a lower discharge rate helps reduce the dynamic response range of the battery during discharge, making the battery's characteristics easier to observe and analyze.This facilitates a more precise investigation into the power characteristics, voltage response, and other dynamic features of the battery while mitigating the thermal effects and internal pressure variations within the battery 19 .
The experimental steps are as follows: Set the temperature of the temperature chamber to 25 °C.① Rest the fully charged 2 V battery unit for 2 h; ② Discharge at 0.  self-discharge resistance, there is an instantaneous change in voltage drop caused by the parallel connection of ohmic resistance and self-discharge resistance at the beginning and end of the current pulse.In the GNL model, the polarization resistance, represented in parallel as a resistor and capacitor, exhibits a hysteresis process in response to the current.Therefore, the voltage drop from U0 to U1 and the voltage rise from U2 to U3 are both caused by the parallel connection of ohmic resistance and self-discharge resistance.The segment from U1 to U2 represents the zero-state response section, while the segment from U3 to U4 represents the zero-input response section.

OCV-SOC curve
The OCV curve of the lead-carbon battery is crucial in both equivalent model parameter identification and SOC estimation.Typically, the OCV-SOC relationship function serves as a crucial basis for parameter identification and SOC estimation 20 .This is because the open circuit voltage of the battery is significantly influenced by factors such as battery aging (internal resistance), ambient temperature, and SOC.In this experiment, the influence of ambient temperature and battery aging on open circuit voltage is disregarded.At a constant temperature of 25 °C, a fully charged 2 V lead-carbon battery cell was allowed to rest for 24 h to achieve internal dynamic equilibrium.Subsequently, a constant current discharge was conducted at a rate of 0.2 C until the cutoff voltage reached 1.8 V, at which point the discharge was halted.
According to the fitted curve of the lead-carbon battery OCV-SOC depicted in Fig. 7, the OCV-SOC relationship of the lead-carbon battery demonstrates a generally linear variation.This linear correlation underscores the advantageous performance of lead-carbon batteries and is crucial for parameter identification and SOC estimation.The data for 11 sets of OCV-SOC curves are presented in Table 1.The functional relationship of OCV-SOC is shown in Eq. 20, which is obtained by fitting using the function toolbox.

Parameters of GNL model
When estimating the SOC of the battery, it is necessary to identify the relevant parameters of the battery's secondorder GNL equivalent circuit model.In the system parameter identification process, the recursive least squares method with a forgetting factor is employed due to its advantages of not requiring prior statistical knowledge and having low computational complexity.In this study, the parameters R0, R1, R2, Rs, Cb, C1, and C2 of the GNL model were identified using the recursive least squares method with a forgetting factor.Ten sets of identification data are listed in Table 2.

UDDS discharge test
To validate the accuracy of the GA-MIUKF algorithm in SOC estimation, this study adopts the Urban Dynamometer Driving Schedule (UDDS) test proposed by the Society of Automotive Engineers (SAE) 21 .The UDDS test simulates the usage scenarios of lead-carbon batteries under different charge/discharge rates, temperatures, and cycling conditions, allowing for the assessment of their performance, lifespan, and prediction of real-world performance.This is crucial for the selection and application of lead-carbon batteries.The current data for the UDDS cycle is scaled based on literature 22 , utilizing the actual voltage, current, and capacity of lead-carbon batteries.The battery terminal voltage curve is depicted in Fig. 8, and the UDDS cycle current curve is shown in Fig. 9.The current curve for a single cycle is illustrated in Fig. 10.In the validation process, the GA-MIUKF algorithm will be applied to estimate the SOC of the lead-carbon battery under UDDS conditions, and the results will be compared with the actual SOC values to evaluate the accuracy and reliability of the proposed algorithm in real-world driving scenarios.

Estimating lead-carbon battery SOC with GA-MIUKF algorithm
Based on the algorithm described above, a program is developed to import the UDDS simulated test data and the parameter data identified from the battery model in Table 2 into the GA-MIUKF algorithm, MIUKF algorithm, and UKF algorithm programs.Through online simulation, a comparison is made between UKF and MI-UKF in estimating the SOC of the lead-carbon battery.The performance of the GA-MIUKF algorithm in estimating SOC under UDDS conditions is evaluated.
The SOC estimation for the lead-carbon battery is conducted in a real-world environment, not just in intermediate states.The averaging method, compared to other common methods, provides more flexibility and adaptability, considering changes across the entire SOC range rather than being limited to intermediate states.www.nature.com/scientificreports/Therefore, selecting the averaging method as the initial SOC value is more conducive to adapting to the battery's behavior at different SOC levels.For a fully charged battery, the default initial SOC is set to 1. Figure 11 illustrates the battery terminal voltage curve estimated by the GA-MIUKF algorithm.Under varying current conditions, the captured battery terminal voltage by GA-MIUKF nearly overlaps with the actual battery terminal voltage, demonstrating the tracking and capturing capabilities of the GA-MIUKF algorithm.The SOC estimation results for the lead-carbon battery by GA-MIUKF are observed to be accurate.
In this research, the Coulomb counting method was selected for the estimation of the battery's actual State of Charge (SOC).By measuring the integral current within the battery testing system, real-time acquisition of the cumulative charge allows for the inference of SOC variations.This approach, characterized by its intuitive and efficient nature, synergizes with precise experimental instrument measurements, providing a comprehensive understanding of the battery's dynamic state 23 .Figures 12 and 13 depict the comparative curves and error curves for SOC estimation of lead-carbon batteries under UDDS conditions using GA-MIUKF, UKF, and MIUKF algorithms, respectively.
Utilizing the GA-MIUKF algorithm for State of Charge (SOC) estimation in lead-carbon batteries and comparing the results with those obtained from UKF, MIUKF, and actual measurements, the following outcomes were obtained: the average error in SOC estimation for the UKF algorithm was 3.5%; for the MIUKF algorithm, it was 2.7%; and for the GA-MIUKF algorithm, it was 2.0%.Evidently, in comparison to traditional UKF and MIUKF algorithms, the estimation results derived from the GA-MIUKF algorithm demonstrate higher precision.Therefore, the GA-MIUKF algorithm can effectively enhance the accuracy of SOC estimation in lead-carbon batteries.

Conclusion
By constructing a second-order GNL equivalent circuit model to simulate lead-carbon batteries and validating it in UDDS simulated operating conditions, this experiment's results demonstrate that using the GA-MIUKF algorithm for estimating lead-carbon battery SOC yields more accurate results, with an average estimation error of only 2.0%.Compared to traditional UKF and MIUKF algorithms, the SOC estimation method based on the GA-MIUKF algorithm better adapts to the characteristics of lead-carbon batteries, significantly improving SOC estimation accuracy and stability.This method holds practical value, providing robust support for state estimation in high-power energy storage batteries, while also offering substantial assistance in battery parameter identification and optimization.Taking into account the diverse computational environments that this algorithm may encounter in practical applications, ranging from powerful computing systems to resource-constrained devices, the challenges associated with its deployment on different platforms are underscored.In future investigations, the focus will be on exploring the adaptability of the algorithm within distinct computational environments, with special consideration given to the performance constraints of resource-constrained devices, such as 8-bit microcontrollers (like Arduino) or 32-bit microcontrollers (like ESP).This dimension of research will contribute to a more comprehensive understanding of the applicability of the GA-MIUKF algorithm, offering practical recommendations for real-world applications.Future research directions could further explore the application of the GA-MIUKF algorithm in SOC estimation for other types of batteries.Additionally, consideration can be given to applying it in areas such as battery fault diagnosis and health management.This would help expand the algorithm's application scope, enhance its applicability in different battery systems, and provide new directions for further research in the field of battery technology 24 (Supplementary Information).

Figure 2 .
Figure 2. Genetic algo identification lead-carbon battery parameter flow chart.

Figure 3 .
Figure 3. GA-MIUKF algorithm estimates the SOC flow chart of lead-carbon battery.
2 C (3.34 A) constant current for 10 s; ③ Stand for 40 s; ④ Charge at 3.34 A constant current for 10 s; ⑤ Stand for 40 s; ⑥ Discharge at 3.34 A current for 30 min; ⑦ Stand for 1 h; ⑧ Cycle steps ②-⑦ for 10 times, sampling time is set to 1 s.The HPPC experiment results are presented in Fig. 5.Figure6shows a zoomed-in view of the battery terminal voltage curve during the HPPC experiment.Here, U0 represents the open-circuit voltage.Due to the compliance with Ohm's law by the ohmic resistance and
5. MI-UKF Algorithm State Estimation for Battery: Utilize the MI-UKF algorithm for state estimation, comprising prediction and update steps.Initially, based on the state and output equations of the GNL battery model, as well as the current and voltage data, obtain the previous time step's state estimate.Predict the current state values based on the previous time step's state estimate and the battery model.Subsequently, update the state values based on the actual measurement data.

Table 1 .
The data of the selected 11 sets of OCV-SOC curves.

Table 2 .
GNL model parameters of lead-carbon battery under different SOC.